{include file='index/_header.html'}

<div class="top-header" style="background-image: url(__STATIC__/themes/__THEME__/img/banner.jpg)">
    <div class="container">
        <h2 class="top-title">{$topic.title}</h2>
        <p class="lead top-description">
            {$topic.subtitle}
            <span class="pull-right"><a href="{:url('index/index')}">首页 </a>  &raquo; <a href="{$topic.nav_href}">{$topic.title}</a></span>
        </p>
    </div>
</div>

<div class="container mtn">

    <div class="row">
        <!-- content -->
        <div class="col-sm-9">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">{$topic.title}</h3>
                </div>
                <div class="panel-body">
                    {$topic.content}
                </div>
            </div>

            {!empty $topic['model_table']:}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">关联模型</h3>
                </div>
                <div class="panel-body">
                    {php $_extend=db($topic['model_table'])->where('tid', $topic['id'])->where('status=1')->find()}
                    {$_extend.summary}
                </div>
            </div>
            {/empty}

        </div>
        <!-- sidebar -->
        <div class="col-sm-3">

            {!empty $topic['sub_nav']:}
            <div class="panel panel-default">
                <div class="list-group">
                    {foreach $topic['sub_nav'] as $sub}
                    <a href="{$sub.href}" class="list-group-item{if $sub['is_active']:} active{/if}" target="{$sub.target}">{$sub.title}</a>
                    {/foreach}
                </div>
            </div>
            {/empty}

            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">在线交流</h3>
                </div>
                <div class="panel-body">
                    QQ群：<a href="{:site('qq_qun1_link')}" target="_blank">{:site('qq_qun1')}</a>
                </div>
            </div>

        </div>
    </div>

</div>
{include file='index/_footer.html'}
</body>
</html>